# 1.需求：input接收用户输入，用户输入“99”，将这个数据99转换成整型。
# 1.接收用户输入
num = input('请输入你的数字：')
print(num)
print(type(num))  # 检测用户输入的数据类型为str
# 2.需要将输入的str数据转换成整型
print(type(int(num)))

# 3.tup1e()--将一个序列转换成元组
list1 = [10, 20, 30]
print(tuple(list1))
# 4.L1st--将一个序列转换成列表
t1 = (1, 2, 3, 4)
print(type(list(t1)))
# 5.eva1()--将字符串中的数据转换成python表达式原本类型
str1 = '10'
str2 = '[1,2,3]'
str3 = '(1,2,3)'
print(type(eval(str1)))
print(type(eval(str2)))
print(type(eval(str3)))

a = 9
b = 5
print(a == b)  # False
print(a != b)  # True
print(a < b)  # False
print(a > b)  # True
print(a <= b)  # False
print(a >= b)  # True

# 1.and:与/且：都真才真
a = 0
b = 1
c = 2
print(a < b and c > b)
print(a > b and c < b)
print(a > b and c > b)
# or或一真都真都假才假
print(a < b or c > b)
print(a < b or c < b)
print(a > b or c < b)

# not取反
print(not True)
print(not False)

a = '张三'
b = '李四'
print(id(a))
print(id(b))
print(a is b)
print(a is not b)
